﻿using System.Linq.Expressions;
using Basic.FlowModel.AuditLogItem;
using Basic.FlowModel.DB;

namespace Basic.FlowCollect
{
    public interface IFlowAuditItemLogCollect
    {
        StayRunAuditItem[] GetStayRunItem ();
        Result[] GetRunItems<Result> ( long[] logId ) where Result : class, new();
        TimeOutLogItem[] GetTimeOuts ();
        AuditItemLog GetAuditLog ( long itemId );
        Result Get<Result> ( long itemId ) where Result : class, new();

        Result[] GetItemLog<Result> ( long logId, long nodeId ) where Result : class, new();

        long[] GetNodeAuditEmpId ( long logId, long rootNodeId, long nodeId );

        long[] GetNodeAuditEmpId ( long logId, long rootNodeId, long[] nodeId );

        Result[] GetsByLogId<Result> ( long logId ) where Result : class, new();

        Result[] Gets<Result> ( long logId, long nodeId, long backNo ) where Result : class, new();

        Result[] Gets<Result> ( long logId, long nodeId ) where Result : class, new();
        Result[] Gets<Result> ( IEnumerable<long> ids ) where Result : class, new();

        Result[] GetGoByNode<Result> ( long rootBatchNo, long[] nodeId ) where Result : class, new();

        long[] GetRunNodeId ( long logId, long rootBatchNo, int lvl );
        Result[] GetsByOptItemId<Result> ( long itemId ) where Result : class, new();
        Result[] GetItems<Result> ( long logId, Expression<Func<DBFlowAuditItemLog, Result>> selector );
        void CheckIsAccredit ( long logId, long empId );
    }
}